# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=rsmangler
pkgver=1.4
pkgrel=15
groups=('blackarch' 'blackarch-automation')
pkgdesc='rsmangler takes a wordlist and mangle it'
url='http://www.randomstorm.com/rsmangler-security-tool.php'
arch=('any')
license=('CCPL')
depends=('ruby')
source=("http://www.randomstorm.com/tools/${pkgname}_${pkgver}.tar.bz2")
sha512sums=('d16fa08db1cd12f33bca72e0f6d2ade8dbaa9184')

package() {
  cd $pkgname

  install -dm 755 "$pkgdir/usr/bin"
  install -dm 755 "$pkgdir/opt/$pkgname"

  cp -a * "$pkgdir/opt/$pkgname/"

  echo -e "#!/bin/bash\nruby /opt/$pkgname/$pkgname.rb \$@" > \
    "$pkgdir/usr/bin/$pkgname"

  chmod +x "$pkgdir/usr/bin/$pkgname"
}

